package com.czkt.springboot_mybatis_test.entity;

import com.czkt.springboot_mybatis_test.entity.vo.CstCustomerBasDict;
import com.czkt.springboot_mybatis_test.entity.vo.StorageProduct;
import com.czkt.springboot_mybatis_test.entity.vo.UserRole;

import java.util.List;

public class Page {
    public int getTotalPageCount() {
        return totalPageCount;
    }

    public void setTotalPageCount(int totalPageCount) {
        this.totalPageCount = totalPageCount;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        if(pageSize > 0) {
            this.pageSize = pageSize;
        }
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        if(totalCount > 0) {
            this.totalCount = totalCount;
            totalPageCount = this.totalCount % pageSize ==0 ?(this.totalCount / pageSize) :(this.totalCount / pageSize + 1);
        }
    }

    public int getPageNo() {
        if(totalPageCount == 0){
            return 0;
        }
        return PageNo;
    }

    public void setPageNo(int currPageNo) {
        if(totalPageCount > 0) {
            this.PageNo = currPageNo;
        }
    }

    //总页数
    private int totalPageCount = 0;
    //页面大小，即每页显示的记录数
    private int pageSize = 3;
    //记录总数
    private int totalCount;
    //当前页数
    private int PageNo = 1;

    public List<UserRole> getSysRoleList() {
        return sysRoleList;
    }

    public void setSysRoleList(List<UserRole> sysRoleList) {
        this.sysRoleList = sysRoleList;
    }

    //每页微博集合
     private List<UserRole> sysRoleList;


    public List<SysRole> getContent() {
        return content;
    }

    public void setContent(List<SysRole> content) {
        this.content = content;
    }

    private List<SysRole> content;


    private List<StorageProduct> storageProducts;

    public List<StorageProduct> getStorageProducts() {
        return storageProducts;
    }

    public void setStorageProducts(List<StorageProduct> storageProducts) {
        this.storageProducts = storageProducts;
    }

    private List<Product> productList;

    public List<Product> getProductList() {
        return productList;
    }

    public void setProductList(List<Product> productList) {
        this.productList = productList;
    }

    private List<BasDict> basDictList;

    public List<BasDict> getBasDictList() {
        return basDictList;
    }

    public void setBasDictList(List<BasDict> basDictList) {
        this.basDictList = basDictList;
    }

    private List<CstCustomerBasDict> cstCustomerBasDicts;

    public List<CstCustomerBasDict> getCstCustomerBasDicts() {
        return cstCustomerBasDicts;
    }

    public void setCstCustomerBasDicts(List<CstCustomerBasDict> cstCustomerBasDicts) {
        this.cstCustomerBasDicts = cstCustomerBasDicts;
    }

    private List<CstLost> cstLostList;

    public List<CstLost> getCstLostList() {
        return cstLostList;
    }

    public void setCstLostList(List<CstLost> cstLostList) {
        this.cstLostList = cstLostList;
    }
}
